<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>My Homework注册</title>

<!--                       CSS                       -->

<!-- Reset Stylesheet -->
<link rel="stylesheet" href="resources/css/reset.css" type="text/css"
	media="screen" />

<!-- Main Stylesheet -->
<link rel="stylesheet" href="resources/css/style.css" type="text/css"
	media="screen" />

<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
<link rel="stylesheet" href="resources/css/invalid.css" type="text/css"
	media="screen" />
<link rel="stylesheet" href="resources/css/boxy.css" type="text/css"
	media="screen" />

<!-- Colour Schemes
	  
		Default colour scheme is green. Uncomment prefered stylesheet to use it.
		
		<link rel="stylesheet" href="resources/css/blue.css" type="text/css" media="screen" />
		
		<link rel="stylesheet" href="resources/css/red.css" type="text/css" media="screen" />  
	 
		-->

<!-- Internet Explorer Fixes Stylesheet -->

<!--[if lte IE 7]>
			<link rel="stylesheet" href="resources/css/ie.css" type="text/css" media="screen" />
		<![endif]-->

<!--                       Javascripts                       -->

<!-- jQuery -->
<script type="text/javascript"
	src="resources/scripts/jquery-1.3.2.min.js"></script>

<!-- jQuery Configuration-->
<script type="text/javascript"
	src="resources/scripts/simpla.jquery.configuration.js"></script>

<!-- Facebox jQuery Plugin
		<script type="text/javascript" src="resources/scripts/facebox.js"></script>
		 -->
<!-- jQuery WYSIWYG Plugin -->
<script type="text/javascript" src="resources/scripts/jquery.wysiwyg.js"></script>

<!-- jQuery Datepicker Plugin -->
<script type="text/javascript"
	src="resources/scripts/jquery.datePicker.js"></script>
<script type="text/javascript" src="resources/scripts/jquery.date.js"></script>

<script type="text/javascript"
	src="resources/scripts/jquery.validate.min.js"></script>
<script type="text/javascript" src="resources/scripts/jquery.form.js"></script>
<script type="text/javascript" src="resources/scripts/jquery.boxy.js"></script>

<!--[if IE]><script type="text/javascript" src="resources/scripts/jquery.bgiframe.js"></script><![endif]-->


<!-- Internet Explorer .png-fix -->

<!--[if IE 6]>
			<script type="text/javascript" src="resources/scripts/DD_belatedPNG_0.0.7a.js"></script>
			<script type="text/javascript">
				DD_belatedPNG.fix('.png_bg, img, li');
			</script>
		<![endif]-->





</head>

<body style="background:none;">
<div style="background:none;">

<div class="content-box" style="width:600px;margin:0 auto;">
	<div class="content-box-header">
		<h3>用户注册</h3>
	</div>
	<!-- End .content-box-header -->

	<div class="content-box-content">

		<div class="tab-content default-tab">

			<h4></h4>
			<form id="register-form" action="register" method="post">

				<fieldset>
					<!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->

					<p>
						<label>学号</label>
						 <input
							class="text-input medium-input required digits" type="text" id="student_id"
							name="student_id" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的学号</small>
					</p>
					
					<p>
						<label>姓名</label>
						 <input
							class="text-input medium-input required" type="text" id="name"
							name="name" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的姓名</small>
					</p>
					
					<p>
						<label>密码</label>
						 <input
							class="text-input medium-input required" type="password" id="password_1"
							name="password" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的密码</small>
					</p>
					
					<p>
						<label>重复密码</label>
						 <input
							class="text-input medium-input required" type="password" id="password_2" equalTo="#password_1"
							name="password_2" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>请重复输入密码</small>
					</p>
					
					
					
					<p>
						<label>学校</label>
						 <input
							class="text-input medium-input required" type="text" id="school"
							name="school" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的学校</small>
					</p>
					
					<p>
						<label>专业</label>
						 <input
							class="text-input medium-input required" type="text" id=""major""
							name="major" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的专业</small>
					</p>
					
					<p>
						<label>E-Mail</label>
						 <input
							class="text-input medium-input required email" type="text" id="email"
							name="email" />
						<!-- Classes for input-notification: success, error, information, attention -->
						<br />
						<small>您的Emai地址</small>
					</p>
					
					<p>
						<input class="button" type="submit" value="提交" />
					</p>

				</fieldset>

				<div class="clear"></div>
				<!-- End .clear -->

			</form>

		</div>
		<!-- End #tab3 -->

	</div>
	<!-- End .content-box-content -->

</div>
<!-- End .content-box -->
<script type="text/javascript" >
$('#register-form').validate();

$('#register-form').ajaxForm({
    // dataType identifies the expected content type of the server response
    dataType: 'json',
    // success identifies the function to invoke when the server response
    // has been received
    success:function(json)
    {
    	if(json.error)
    		{
    			if(json.error_type=="UserIDExisted")
					Boxy.alert("您的学号已经注册过了", function() {}, {title: '错误'});
    			else
    				Boxy.alert("创建错误，请检查您的信息"+json.error_type, function() {}, {title: '错误'});
    		}
    	else
    		Boxy.alert("注册成功", function() {
    			$('#main-content').load('my_group')
    		}, {title: '成功'});
    }
});
</script>
</div>
</body>
</html>



